$(function(){


    /***********************  头部导航切换  ******************************************/

    var navChangeFn = (function() {
        var comIcon = $('.comIcon');
        var comlist_menu = $('.comlist_menu','#navWrap');
        var comUrl = $('.comUrl');
        var xFrame = $('.x-iframe');
        var timer = null ;

        //console.log('comIcon' , comIcon );

        // 图标变颜色
        comIcon.each( function(i){
            $(this).hover(function(){
                //console.log('index', i );
                $(this).addClass('icon_'+ (i+1) +'_active');
                comlist_menu.hide();
                comlist_menu.eq(i).show();
            },function(){
                $(this).removeClass('icon_'+ (i+1) +'_active');
                timer = setTimeout( function() {
                    comlist_menu.eq(i).hide();
                },300);
            });

            comlist_menu.eq(i).hover( function(){
                clearTimeout(timer);
            },function(){
                comlist_menu.eq(i).hide();
            });
        });


        comUrl.each(function(){
            $(this).click( function(){
                var nowUrl = $(this).attr('url');
                xFrame.attr('src',nowUrl);
            })
        });

        //首页导航
        $('#homeIndex').click(function(){
            var nowUrl = $(this).attr('url');
            xFrame.attr('src',nowUrl);
        })

        

    })();
    $('#firstLi').click( function() {
       
    })
})